.class public Lcom/htc/android/footprints/utils/clearCachedRunnable;
.super Ljava/lang/Object;
.source "clearCachedRunnable.java"

# interfaces
.implements Ljava/lang/Runnable;


# static fields
.field public static final TAG:Ljava/lang/String; = "clearCachedRunnable"


# instance fields
.field private footprints:[Lcom/htc/android/footprints/vo/Footprint;

.field private mImageManager:Lcom/htc/android/footprints/utils/camera/FootprintImageManager;


# direct methods
.method public constructor <init>([Lcom/htc/android/footprints/vo/Footprint;)V
    .locals 1
    .parameter "data"

    .prologue
    .line 14
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 12
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/htc/android/footprints/utils/clearCachedRunnable;->footprints:[Lcom/htc/android/footprints/vo/Footprint;

    .line 15
    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getInstance()Lcom/htc/android/footprints/utils/camera/FootprintImageManager;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/utils/clearCachedRunnable;->mImageManager:Lcom/htc/android/footprints/utils/camera/FootprintImageManager;

    .line 16
    if-eqz p1, :cond_0

    array-length v0, p1

    if-lez v0, :cond_0

    iput-object p1, p0, Lcom/htc/android/footprints/utils/clearCachedRunnable;->footprints:[Lcom/htc/android/footprints/vo/Footprint;

    .line 17
    :cond_0
    return-void
.end method


# virtual methods
.method public run()V
    .locals 7

    .prologue
    .line 20
    iget-object v5, p0, Lcom/htc/android/footprints/utils/clearCachedRunnable;->footprints:[Lcom/htc/android/footprints/vo/Footprint;

    if-eqz v5, :cond_0

    iget-object v5, p0, Lcom/htc/android/footprints/utils/clearCachedRunnable;->footprints:[Lcom/htc/android/footprints/vo/Footprint;

    array-length v5, v5

    if-nez v5, :cond_1

    .line 32
    :cond_0
    return-void

    .line 21
    :cond_1
    iget-object v0, p0, Lcom/htc/android/footprints/utils/clearCachedRunnable;->footprints:[Lcom/htc/android/footprints/vo/Footprint;

    .local v0, arr$:[Lcom/htc/android/footprints/vo/Footprint;
    array-length v4, v0

    .local v4, len$:I
    const/4 v3, 0x0

    .local v3, i$:I
    :goto_0
    if-ge v3, v4, :cond_0

    aget-object v2, v0, v3

    .line 23
    .local v2, f:Lcom/htc/android/footprints/vo/Footprint;
    :try_start_0
    iget-object v5, v2, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    if-eqz v5, :cond_2

    iget-object v5, v2, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    invoke-virtual {v5}, Ljava/lang/String;->length()I

    move-result v5

    if-lez v5, :cond_2

    .line 24
    iget-object v5, p0, Lcom/htc/android/footprints/utils/clearCachedRunnable;->mImageManager:Lcom/htc/android/footprints/utils/camera/FootprintImageManager;

    iget-object v6, v2, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    invoke-virtual {v5, v6}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->clearCachebyKeyword(Ljava/lang/String;)V

    .line 26
    :cond_2
    const-wide/16 v5, 0xa

    invoke-static {v5, v6}, Ljava/lang/Thread;->sleep(J)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    .line 21
    :goto_1
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 27
    :catch_0
    move-exception v5

    move-object v1, v5

    .line 28
    .local v1, e:Ljava/lang/InterruptedException;
    invoke-virtual {v1}, Ljava/lang/InterruptedException;->printStackTrace()V

    goto :goto_1
.end method
